package cn.wolfcode.shop.cloud.web.feign;

import cn.wolfcode.shop.cloud.Result;
import cn.wolfcode.shop.cloud.domain.Good;
import cn.wolfcode.shop.cloud.web.feign.GoodsFeignApi;
import cn.wolfcode.shop.cloud.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

@RestController
public class GoodsFeignClient implements GoodsFeignApi {

    @Autowired
    private IGoodsService goodsService;

    @Override
    public Result<List<Good>> queryGoods(Set<Long> goodsIds) {
        return Result.success(goodsService.queryGoods(goodsIds));
    }
}
